<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    #box {
      width: 200px;
      height: 200px;
      border: 2px solid #111;
    }
  </style>
  <body>
    <button onclick="kkk()">变宽</button>
    <button onclick="ggg()">变高</button>
    <button onclick="sss()">变色</button>
    <div id="box"></div>
  </body>
  <script>
    var box = document.getElementById("box");
    function kkk() {
      box.style.width = "500px";
    }
    function ggg() {
      box.style.height = "500px";
    }
    function sss() {
      box.style.backgroundColor = "aqua";
    }
  </script>
</html>
